<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width: 160px;
            height: 80px;
            margin: 10px;
            padding: 10px;
            border: 10px solid orange;
            background: pink;
        }

        /**元素的总宽度 = 160 + 20*2 + 8*2; 总高度 = 80 + 20*2 + 8*2 ; */
        .content-box {
            box-sizing: content-box;
        }

        /** 元素的总宽度 = 160; 总高度 = 80px; */
        .border-box {
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<div class="content-box">Content box</div>
<br>
<div class="border-box">Border box</div>
</body>
</html>